package com.atguigu.eduservice.client;

import com.atguigu.commonutils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@Component
@FeignClient(name = "service-vod",fallback = VodFileDegradeFeignClient.class)
public interface VodClient {
    //根据id删除阿里云视频
    //@PathVariable一定要指定参数名称
    @DeleteMapping("/eduvod/video/deleteAlyVideo/{id}")
    public R removeAlyVideo(@PathVariable("id") String id);


    //删除课程同时删除多个阿里云视频
    @DeleteMapping("/eduvod/video/deleteBatch")
    public R deleteBatch(@RequestParam("videoList") List<String> videoList);
}
